Closed (fixed)
Project:
Drupal core
Version:
6.12
Component:
forms system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2009 at 23:54 UTC
Updated:
26 Jul 2009 at 22:10 UTC
Does anyone know how to style a single-select dropdown, which is based on a taxonomy vocabulary?
As it is now, the styling is a dash added in front of the child terms, like this:
Parent
-Child
--Grandchild
-Child
-Child
Parent
-Child
Ideally I would like to style the parent term bold, to really make it stand out and clarify where a new category begins.
Alternatively, adding a space in front of the dash would also be an improvement, or substituting it with another character (for example »), if the first option isn't possible.
Thank you.
Comments
Comment #1
exobuzz commentedThis template.php code works for me. Not perfect as I only change the values that start with a "-". I guess i need to override some select rendering function to insert some classes. or use some javascript to post process the html.
Comment #2
ressaHi exobuzz,
Great script, it got me started and is much appreciated! I combined it with another function and have posted my end result in the taxonomy group, where I probably should have posted this question in the first place: http://groups.drupal.org/node/23883
Thanks.